<template>
	<view class="my-page">
		<view class="uset-box flex items-center">
			<image class="avatar" :src="this_user_info.user_headimg" mode="aspectFill"></image>
			<view class="user-info">
				<view class="name">{{this_user_info.user_nickname}}</view>
				<view class="phone" v-if="this_user_info.user_auth_status == 2">{{this_user_info.user_true_phone}}</view>
				<view class="login_info" @click="goLogin()" v-else>完善信息</view>
			</view>
		</view>
		<view class="cell-box">
			<view class="cell-item flex items-center justify-between" @click="goExamine(0)">
				<view class="left flex items-center">
					<image class="icon" src="../../static/1.png" mode="aspectFill"></image>
					<view class="label">
						<text>待审核</text>
						<text class="tibetan">（ཞིབ་བཤེར་བྱེད་རྒྱུར་སྒུག་པ།）</text>
					</view>
				</view>
				<u-icon name="arrow-right" color="#666" size="32rpx"></u-icon>
			</view>
			<view class="cell-item flex items-center justify-between" @click="goExamine(1)">
				<view class="left flex items-center">
					<image class="icon" src="../../static/2.png" mode="aspectFill"></image>
					<view class="label">
						<text>已审核</text>
						<text class="tibetan">（ཞིབ་བཤེར་བྱས་ཟིན།）</text>
					</view>
				</view>
				<u-icon name="arrow-right" color="#666" size="32rpx"></u-icon>
			</view>
			<view class="cell-item flex items-center justify-between" @click="goExamine(2)">
				<view class="left flex items-center">
					<image class="icon" src="../../static/3.png" mode="aspectFill"></image>
					<view class="label">
						<text>已驳回</text>
						<text class="tibetan">（ཕྱིར་བསློགས་ཟིན།）</text>
					</view>
				</view>
				<u-icon name="arrow-right" color="#666" size="32rpx"></u-icon>
			</view>
			<view class="cell-item flex items-center justify-between" @click="goEdit()">
				<view class="left flex items-center">
					<image class="icon" src="../../static/2.png" mode="aspectFill"></image>
					<view class="label">
						<text>完善(修改)个人信息</text>
						<text class="tibetan">（རང་ཉིད་ཀྱི་ཆ་འཕྲིན་འཐུས་སྒོ་ཚང་བར་བཏང་དགོས།）</text>
					</view>
				</view>
				<u-icon name="arrow-right" color="#666" size="32rpx"></u-icon>
			</view>
		</view>
	</view>
</template>

<script>
	const util = require('../../common/util.js');
	export default {
		data () {
			return {
				this_user_info:{}
			}
		},
		onShow() {
			this.loadData();
		},
		methods: {
			loadData: function() {
				let that = this;
				var requsetData = {};
				util.requestPost(
					'/User/index',
					requsetData,
					function(res) {
						that.this_user_info = res.data.this_user_info;
					},
					'',
					{ isShowLoading: false }
				);
			},
			goExamine (a_status) {
				uni.navigateTo({
					url: '/pages/my/examine?a_status='+a_status
				})
			},
			goEdit(){
				uni.navigateTo({
					url: '/pages/login/auth_info'
				})
			},
			goLogin() {
				uni.navigateTo({
					url: '/pages/login/login'
				})
			}
		}
	}
</script>

<style lang="scss">
.my-page {
	min-height: 100%;
	background-color: $bg-color;
	.uset-box {
		padding: 52rpx 36rpx;
		background-color: $primary-color;
		.avatar {
			width: 118rpx;
			height: 118rpx;
			border-radius: 50%;
		}
		.user-info {
			color: #fff;
			font-size: 32rpx;
			margin-left: 20rpx;
			.phone {
				margin-top: 12rpx;
			}
			.login_info{
				width: 160rpx;
				border-radius: 10rpx;
				text-align: center;
				font-size:28rpx;
				padding: 10rpx;
				margin-top:20rpx;
				background-color:limegreen;
			}
		}
	}
	.cell-box {
		padding: 20rpx 36rpx;
		.cell-item {
			padding: 0 16rpx;
			height: 110rpx;
			border-bottom: $border-base;
			.left {
				.icon {
					width: 40rpx;
					height: 40rpx;
				}
				.label {
					color: #333;
					font-size: 32rpx;
					margin-left: 20rpx;
					.tibetan {
						margin-left: 8rpx;
						font-size: 24rpx;
					}
				}
			}
		}
	}
}
</style>
